<?php
namespace AiSPRDocManager\Model;

use AiSPRDocManager\Model\Utility as AiCvMModelUtility;
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Setup
 *
 * @author Asfer <rmasfer@gmail.com>
 */
class Setup {

	public static function createCvManager () {
//		die('create');
		global $wpdb;

		$sTableName = AiCvMModelUtility::getTableName('cv_manager');

		$wpdb->query("DROP TABLE IF EXISTS `" . $sTableName . "`;");


		$sTableQuery = "
			CREATE TABLE IF NOT EXISTS `" . $sTableName . "` (
			`id` int(11) NOT NULL AUTO_INCREMENT,
			`name` varchar(250) COLLATE utf8_unicode_ci NOT NULL,
			`email` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
			`comments` varchar(256) COLLATE utf8_unicode_ci NOT NULL,
			`date` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
			`status` int(11) NOT NULL,
			`file` varchar(512) COLLATE utf8_unicode_ci NOT NULL,
			PRIMARY KEY (`id`)
			) ENGINE=InnoDB  DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
		";

		$wpdb->query($sTableQuery);
	}
}

?>